﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><link href="http://getmailaddress.googlecode.com/svn/trunk/E/custom.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body>
        <div><script language="JavaScript">
//<![CDATA[
function HowLongSince(startyear, startmonth, startdate) {
  var DaysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
  var today = new Date()
  var thisyear = today.getFullYear();
  var thismonth = today.getMonth();
  var thisdate = today.getDate();
  mstart = new Date(startyear, startmonth, 1);
  mend = new Date(thisyear, thismonth, 1);
  ydiff = thisyear - mstart.getFullYear();
  mdiff = thismonth - mstart.getMonth();
  days1 = (mstart - new Date(startyear, startmonth - 1,startdate))/(24*60*60*1000) - 1;
  days2 = (new Date(thisyear,thismonth,thisdate) - mend)/(24*60*60*1000) + 1;
  dayst = days1 + days2;
  if (dayst >= DaysInMonth[startmonth - 1])  {
    mdiff += 1;
    dayst -= DaysInMonth[startmonth - 1];
  }
  if (ydiff == 0 && mdiff == 0 && dayst == 0)
    message = "今天";
  else {
    if (mdiff > 11) { mdiff = 0; ydiff++; }
    if (mdiff < 0) { mdiff = mdiff + 12; ydiff--; }
    message = (ydiff != 0 ? ydiff + " Years" : "");
    message += (mdiff != 0 ? " " + mdiff + " week" : "");
    if (ydiff != 0 && mdiff != 0) message += "";
    message += (dayst!=0 ? " " + dayst+" days" : "");
  }
  return message;
}
//]]>
</script>
  <script language="JavaScript">
document.write(HowLongSince(2007,02,10)); 
</script>  <script language=javascript>
//开始计时
<!--
BirthDay=new Date("02/11/2007 00:00:00");//改成你的计时日期，
today=new Date();
function THINPIGServerTime(){
today.setTime(today.getTime()+250);
timeold=(today.getTime()-BirthDay.getTime());
sectimeold=timeold/1000
secondsold=Math.floor(sectimeold);
msPerDay=24*60*60*1000
e_daysold=timeold/msPerDay
daysold=Math.floor(e_daysold);
e_hrsold=(e_daysold-daysold)*24;
hrsold=Math.floor(e_hrsold);
e_minsold=(e_hrsold-hrsold)*60;
minsold=Math.floor((e_hrsold-hrsold)*60);
seconds=Math.floor((e_minsold-minsold)*60);
document.getElementById("djclock").innerHTML =daysold+" Days "+hrsold+" hrs "+minsold+" min "+seconds+" sec";
}
setInterval("THINPIGServerTime()",250);
//-->
</script><span id="djclock"></span><br /><script language="JavaScript">
//<![CDATA[
function HowLongSince(startyear, startmonth, startdate) {
  var DaysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
  var today = new Date()
  var thisyear = today.getFullYear();
  var thismonth = today.getMonth();
  var thisdate = today.getDate();
  mstart = new Date(startyear, startmonth, 1);
  mend = new Date(thisyear, thismonth, 1);
  ydiff = thisyear - mstart.getFullYear();
  mdiff = thismonth - mstart.getMonth();
  days1 = (mstart - new Date(startyear, startmonth - 1,startdate))/(24*60*60*1000) - 1;
  days2 = (new Date(thisyear,thismonth,thisdate) - mend)/(24*60*60*1000) + 1;
  dayst = days1 + days2;
  if (dayst >= DaysInMonth[startmonth - 1])  {
    mdiff += 1;
    dayst -= DaysInMonth[startmonth - 1];
  }
  if (ydiff == 0 && mdiff == 0 && dayst == 0)
    message = "今天";
  else {
    if (mdiff > 11) { mdiff = 0; ydiff++; }
    if (mdiff < 0) { mdiff = mdiff + 12; ydiff--; }
    message = (ydiff != 0 ? ydiff + " Years" : "");
    message += (mdiff != 0 ? " " + mdiff + " week" : "");
    if (ydiff != 0 && mdiff != 0) message += "";
    message += (dayst!=0 ? " " + dayst+" days" : "");
  }
  return message;
}
//]]>
</script>
  <script language="JavaScript">
document.write(HowLongSince(2008,01,20)); 
</script>  <span id="sunray"></span><script language=javascript>
<!--
BirthDay1=new Date("01/20/2008 18:00:00");//改成你的计时日期
today1=new Date();
function THINPIGServerTime1(){
today1.setTime(today1.getTime()+250);
timeold1=(today1.getTime()-BirthDay1.getTime());
sectimeold1=timeold1/1000
secondsold1=Math.floor(sectimeold1);
msPerDay1=24*60*60*1000
e_daysold1=timeold1/msPerDay1
daysold1=Math.floor(e_daysold1);
e_hrsold1=(e_daysold1-daysold1)*24;
hrsold1=Math.floor(e_hrsold1);
e_minsold1=(e_hrsold1-hrsold1)*60;
minsold1=Math.floor((e_hrsold1-hrsold1)*60);
seconds1=Math.floor((e_minsold1-minsold1)*60);
document.getElementById("sunray").innerHTML ='<span>'+daysold1+"</span> Days <span>"+hrsold1+"</span> hrs <span>"+minsold1+"</span> min <span>"+seconds1+"</span> sec <span>";
}
setInterval("THINPIGServerTime1()",250);
//-->
</script><br /><span id="s"></span><script language="javascript">  
startclock()  
var timerID = null;  
var timerRunning = false;  
function showtime() {  
Today = new Date();  
var NowHour = Today.getHours();  
var NowMinute = Today.getMinutes();  
var NowMonth = Today.getMonth();  
var NowDate = Today.getDate();  
var NowYear = Today.getYear();  
var NowSecond = Today.getSeconds();  
if (NowYear <2000)  
NowYear=1900+NowYear;  
Today = null;  
Hourleft = 00 - NowHour  
Minuteleft = 00 - NowMinute  
Secondleft = 00 - NowSecond  
Yearleft = 2014 - NowYear  
Monthleft = 12 - NowMonth - 1
Dateleft = 04 - NowDate  
if (Secondleft<0)  
{  
Secondleft=60+Secondleft;  
Minuteleft=Minuteleft-1;  
}  
if (Minuteleft<0)  
{   
Minuteleft=60+Minuteleft;  
Hourleft=Hourleft-1;  
}  
if (Hourleft<0)  
{  
Hourleft=24+Hourleft;  
Dateleft=Dateleft-1;  
}  
if (Dateleft<0)  
{  
Dateleft=31+Dateleft;  
Monthleft=Monthleft-1;  
}  
if (Monthleft<0)  
{  
Monthleft=12+Monthleft;  
Yearleft=Yearleft-1;  
}  
document.getElementById("s").innerHTML =Yearleft+' Years '+Monthleft+' week '+Dateleft+' days ' 
timerID = setTimeout("showtime()",1000);  
timerRunning = true;  
}  
var timerID = null;  
var timerRunning = false;  
function stopclock () {  
if(timerRunning)  
clearTimeout(timerID);  
timerRunning = false;  
}  
function startclock () {  
stopclock();  
showtime();  
}  
// -->  
</script><div id="Layer1" style="position:absolute; left:130px; top:36px; z-index:1"><script type="text/javascript" language="javascript">
        var target=[]
        var time_id=[]
        /*
           原理:每次和当前时间比较,得到天、小时、分、秒
        */
        function show_date_time_0()
         {
             setTimeout("show_date_time_0()", 1000);
            for (var i=0,j=target.length;i<j;i++)
             {
                 today=new Date();          
                //计算目标时间与当前时间间隔(毫秒数)
                var timeold=target[i]-today.getTime(); //getTime 方法返回一个整数值，这个整数代表了从 1970 年 1 月 1 日开始计算到 Date 对象中的时间之间的毫秒数。
                
                //计算目标时间与当前时间的秒数
                var sectimeold=timeold/1000;
                
                //计算目标时间与当前时间的秒数(整数)
                var secondsold=Math.floor(sectimeold);
                
                //计算一天的秒数
                var   msPerDay=24*60*60*1000;
               
                //得到剩余天数
                var e_daysold=timeold/msPerDay;
                 //得到剩余天数(整数)
                var daysold=Math.floor(e_daysold);
                
                //得到剩余天数以外的小时数
                var e_hrsold=(e_daysold-daysold)*24;
                 //得到剩余天数以外的小时数(整数)
                var hrsold=Math.floor(e_hrsold);
                
                //得到尾剩余分数
                var e_minsold=(e_hrsold-hrsold)*60;
                //得到尾剩余分数(整数)
                 minsold=Math.floor((e_hrsold-hrsold)*60);
                
                //得到尾剩余秒数(整数)
                 seconds=Math.floor((e_minsold-minsold)*60);
                if (daysold<0)
                 {
                     document.getElementById(time_id[i]).innerHTML="逾期,倒计时已经失效";
                 }  
                else
                 {
                    //天数取三位,不足时前边补0
                    if (daysold<10) { daysold="0"+daysold }
                    //天数取三位,不足时前边补0
                    if (daysold<100) { daysold="0"+daysold }
                    
                    //小时取两位,不足补0
                    if (hrsold<10) { hrsold="0"+hrsold }
                    //分数取两位,不足补0
                    if (minsold<10) {minsold="0"+minsold}
                    //秒数取两位,不足补0
                    if (seconds<10) {seconds="0"+seconds}
                    
                    //小于三天时,字体为红色
                    if (daysold<3) {
                         document.getElementById(time_id[i]).innerHTML="<font color=red>"+daysold+" Days "+hrsold+" hrs "+minsold+" min "+seconds+"sec</font>";
                     }  
                    else
                     {
                         document.getElementById(time_id[i]).innerHTML=daysold+" Days "+hrsold+" hrs "+minsold+" min "+seconds+" sec ";
                     }
                 }
                 
             }
         }
         setTimeout("show_date_time_0()", 100);
    </script>


    <div id="TimeCounter_0">
    </div>

    <script type="text/javascript">
        //设定目标时间(数组元素)
        //target[target.length]=new Date(年,月-1,日,时,分,秒).getTime()
         target[target.length]=new Date(2014,12-1,04,00,00,00).getTime();
        
        //设定倒计时显示地址(数组元素)
         time_id[time_id.length]="TimeCounter_0"
    </script></div></div>
</body>
</html>